package gnolls.dao;

import java.io.Serializable;
import java.util.List;

/**
 * The generic DAO interface with base CRUD methods.
 */
public interface GenericDao<T, PK extends Serializable> {

	/** Persist the new object into database */
	PK create(T o);

	/** Retrieve a persisted object from database */
	T find(PK id);

	/** Retrieve persisted objects from database */
	List<T> findAll();

	/** Save changes made to a persistent object */
	void update(T o);

	/** Delete a persistent object from database */
	void delete(T o);

}
